﻿<UserControl x:Class="InterLinq.Test.UI.PagedProductsView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:this="clr-namespace:InterLinq.Test.UI.Convertor"
    >
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Themes\TabControl.xaml"/>
                <ResourceDictionary Source="Themes\TabItem.xaml"/>
                <ResourceDictionary Source="Themes\Button.xaml"/>
                <ResourceDictionary Source="Themes\GroupBox.xaml"/>
                <ResourceDictionary Source="Themes\TextBox.xaml"/>
                <ResourceDictionary Source="Themes\ScrollBar.xaml"/>
                <ResourceDictionary Source="Themes\ListView.xaml"/>
                <ResourceDictionary Source="Themes\ListBox.xaml"/>
                <ResourceDictionary Source="Themes\ComboBox.xaml"/>
                <ResourceDictionary Source="Themes\TreeView.xaml"/>
                <ResourceDictionary Source="Themes\Menu.xaml"/>
                <ResourceDictionary Source="Themes\ProgressBar.xaml"/>
                <ResourceDictionary Source="Themes\ToolTip.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <StackPanel>
        <StackPanel Orientation="Horizontal">
            <Label>Searching for products by Name:</Label>
            <TextBox Width="150" Name="m_searchInput">Product</TextBox>
            <Button Click="Button_Click">Search</Button>
        </StackPanel>
        <StackPanel Orientation="Horizontal">
            <Label Name="m_count">0</Label>
            <Label>products have been returned</Label>
        </StackPanel>
        <StackPanel Orientation="Horizontal">
            <ItemsControl Name="m_items" Width="350" Height="600">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <StackPanel.Visibility>
                                <Binding>
                                    <Binding.Converter>
                                        <this:IsDefaulToVisibillityConverter/>
                                    </Binding.Converter>
                                </Binding>
                            </StackPanel.Visibility>
                            <TextBox Width="150" Text="{Binding Name}"></TextBox>
                            <Label Width="150" Content="{Binding Price}" HorizontalAlignment="Right"></Label>
                        </StackPanel>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
            <ScrollBar Orientation="Vertical" Minimum="0" ValueChanged="ScrollBar_ValueChanged" Name="m_scrollBar">

            </ScrollBar>
        </StackPanel>
    </StackPanel>
</UserControl>
